<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-name" class="form-control" name="row[name]"   data-rule="required"  type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Image')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-image" class="form-control" size="50" name="row[image]" type="text" value="">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-image" class="btn btn-danger faupload" data-input-id="c-image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-image" class="btn btn-primary fachoose" data-input-id="c-image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-image"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-image"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Service_category_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-service_category_id" data-rule="required" data-source="xiservice/service_category/index" class="form-control selectpage" name="row[service_category_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Images')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-images" class="form-control" size="50" name="row[images]" type="text" value="">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-images" class="btn btn-danger faupload" data-input-id="c-images" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="true" data-preview-id="p-images"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-images" class="btn btn-primary fachoose" data-input-id="c-images" data-mimetype="image/*" data-multiple="true"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-images"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-images"></ul>
        </div>
    </div>


    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Service_desc')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-service_desc" class="form-control" name="row[service_desc]" type="text" data-rule="required" value="">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-content" class="form-control editor" rows="5" name="row[content]" cols="50"></textarea>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('时长类型')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <select  id="c-service_time_type" class="form-control selectpicker" name="row[service_time_type]">
                    <option value="1" selected >固定时长</option>
                    <option value="2"  >自选时长</option>
                    <option value="3"  >无时长</option>
            </select>
        </div>
    </div>


    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('服务时长')}:</label>
        <div class="col-xs-12 col-sm-8">       
            <select  id="c-service_duration" class="form-control selectpicker" name="row[service_duration]">
                    <option value="30" selected >30分钟</option>
                    <option value="60"  >60分钟</option>
                    <option value="90"  >90分钟</option>
                    <option value="120" >120分钟</option>
                    <option value="150" >150分钟</option>
                    <option value="180" >180分钟</option>
            </select>
        </div>
    </div>


    <div class="form-group hide">
        <label class="control-label col-xs-12 col-sm-2">{:__('服务时长区间')}:</label>
        <div class="col-xs-12 col-sm-8">       
            <select  id="c-service_time_unit" class="form-control selectpicker" name="row[service_time_unit]">
                    <option value="30"   checked  >30分钟</option>
                    <option value="60"   >60分钟</option>
            </select>
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Is_chose')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="choseList" item="vo"}
            <label for="row[is_chose]-{$key}"><input id="row[is_chose]-{$key}" name="row[is_chose]" type="radio" value="{$key}" {in name="key" value="0"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Bargain')}:</label>
        <div class="col-xs-12 col-sm-8">
                        
            <select  id="c-bargain" class="form-control selectpicker" name="row[bargain]">
                {foreach name="bargainList" item="vo"}
                    <option value="{$key}" {in name="key" value="0"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Serviceprice')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-serviceprice" class="form-control" step="0.01" name="row[serviceprice]"   data-rule="required" type="number" value="0.00">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Saleprice')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-saleprice" class="form-control" step="0.01" name="row[saleprice]" data-rule="required" type="number">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Basicnums')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-basicnums" class="form-control" name="row[basicnums]" step="1"   data-rule="required;integer[+0]" type="number" value="0">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('平台提成(%)')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-commission" class="form-control" name="row[commission]" type="number" step="1"  data-rule="required;integer[+0]" value="0">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Quality day')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-quality_day" class="form-control" step="1" name="row[quality_day]" data-rule="required" type="number">
        </div>
    </div>
    
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">每平方价格:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-lowprice" class="form-control" name="row[lowprice]" type="text">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">服务城市:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-city_id" data-rule="required" data-source="xiservice/area/index"   data-params='{"custom[level]":"2"}'  class="form-control selectpage" name="row[city_id]" type="text" value="">
        </div>
    </div>


    <!-- <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">质保金(%):</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-quality_rate" class="form-control" name="row[quality_rate]" data-rule="required" type="number">
        </div>
    </div> -->
    <!-- <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">施工提成(%):</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-sale_rate" class="form-control" name="row[sale_rate]" data-rule="required" type="number">
        </div>
    </div> -->
    <!-- <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">保险金(%):</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-insure" class="form-control" name="row[insure]" data-rule="required" type="number">
        </div>
    </div> -->


    <!-- <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">质保一年:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-quality_year_one" class="form-control" name="row[quality_year_one]" data-rule="required" value="1" type="number">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">质保一年费用:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-quality_year_rate_one" class="form-control" name="row[quality_year_rate_one]" type="text" data-rule="required" value="">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">质保二年:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-quality_year_two" class="form-control" name="row[quality_year_two]" data-rule="required" value="2" type="number">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">质保二年费用:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-quality_year_rate_two" class="form-control" name="row[quality_year_rate_two]" type="text" data-rule="required" value="">
        </div>
    </div>

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">质保三年:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-quality_year_there" class="form-control" name="row[quality_year_there]" data-rule="required" value="3" type="number">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">质保三年费用:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-quality_year_rate_there" class="form-control" name="row[quality_year_rate_there]" type="text" data-rule="required" value="">
        </div>
    </div> -->
  
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
